//
//  XFXSelfViewController.m
//  XFXnews
//
//  Created by dllo on 16/3/1.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "XFXSelfViewController.h"
#import "UserHeaderView.h"
@interface XFXSelfViewController ()<UITableViewDelegate,UITableViewDataSource>
//@property (retain, nonatomic)UIView *myHeaderView;
//@property (retain, nonatomic) UITableView *selfTableView;
@property (nonatomic, strong)UITableView *myTableView;
@property (nonatomic,retain)UserHeaderView *myview;
@property (nonatomic,retain)UIView *myHeaderView;
@end

@implementation XFXSelfViewController

//- (void)viewDidLoad {
//    [super viewDidLoad];
//    // Do any additional setup after loading the view from its nib.
//    //self.selfTableView.tableHeaderView = _myHeaderView;
//    self.view.backgroundColor = [UIColor redColor];
//    self.navigationController.navigationBar.barTintColor = [UIColor clearColor];
//    self.navigationItem.title = @"我的";
//    self.selfTableView = [[UITableView alloc]initWithFrame:[[UIScreen mainScreen] bounds]style:UITableViewStylePlain];
//    [self.view addSubview:self.selfTableView];
//    
//    [self.selfTableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"selfCell"];
//    self.myHeaderView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 414, 200)];
//    self.myHeaderView.backgroundColor = [UIColor redColor];
//    
//    
//    self.selfTableView.tableHeaderView = self.myHeaderView;
//    
//    
//    
//}
//
//
//-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
//    return 200;
//}
//
//-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
//    return 5;
//}
//
//-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
//    UITableViewCell *cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"selfCell"];
//    cell.backgroundColor = [UIColor yellowColor];
//    return cell;
//}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.navigationItem.title = @"我的";
    self.navigationController.navigationBar.barTintColor = [UIColor redColor];
    
    self.myTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
    self.myTableView.delegate = self;
    self.myTableView.dataSource = self;
    [self.view addSubview:self.myTableView];
    
    
    self.myview = [[UserHeaderView alloc]initWithFrame:CGRectMake(0, -50, 414, 250*736/736)];
    self.myTableView.tableHeaderView = self.myview;
    //self.myview.loginDelegate = self;
    
    
}


//- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
//    
//    UsearSectionHeaderView *sectionView = [[UsearSectionHeaderView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, 50*HEIGHT/736)];
//    [tableView addSubview:sectionView];
//    
//    sectionView.myDelegate = self;
//    
//    return sectionView;
//    
//}




- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 3;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *ID = @"cell";
    
    UITableViewCell *cell =[tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
    }
    
    //    cell.textLabel.text = [indexPath];
    
    
    return cell;
}






- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
